<?php

namespace Yolo\Captcha\Core;

class CaptchaResult
{

    public function __construct(private readonly array $data)
    {
    }

    /**
     * 获取验证码文本
     * @return string
     */
    public function getText(): string
    {
        return $this->data['text'];
    }

    /**
     * 获取验证码答案
     * @return string
     */
    public function getAnswer(): string
    {
        return $this->data['answer'];
    }

    public function getTextData(): array
    {
        return $this->data['textData'];
    }
}
